<?php
	//$tribe_id
		$pho_db='phome_jat_pic';
		$p=$_REQUEST['p'];
		$is_good=$_REQUEST['gd'];
		$whArr=array('app_type'=>TRIBE_ID_ROOT,'app_id'=>$tribe_id);
		if($is_good){
			$whArr['is_good']='1';
		}

		$nums=DbTouch($pho_db,$whArr,"count(*) as total");
		$page=new page_obj($p,array("itemnum"=>10,"border"=>4,"row_count"=>$nums['total']));
		$limit_str=$page->get_limit_str();
		$pho_list=DbTouchAll($pho_db,$whArr,'*',' order by time desc  '.$limit_str);
		$page_list=$page->build_html_link("p");

?>
<style>
	.ipt_box{width:100%;}
	.big-box{height:120px;}
	.current_subject{color:#eee;background:#;}
</style>
<ol id="dh">
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>">部落首页</a></li>
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>&m=subject">部落讨论</a></li>
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>&m=act">部落活动</a></li>
	<li><a href="<?=$public_r[newsurl]?>tribe/detail/?id=<?=$tribe_id?>&m=pho" class="change">部落相册</a></li>
</ol>
 <span class="clear"></span> 
<div id="photo" style='height:auto;'>
		<h3>
			<span><a href="./?id=<?=$tribe_id?>&m=pho">查看全部</a></span>
			<span><a href="./?id=<?=$tribe_id?>&m=u">上传照片</a></span>
			<span><a href="./?id=<?=$tribe_id?>&m=abm">创建新相册</a></span>
			部落全部照片
		</h3>
		<ul>
		<?php if($pho_list){
			foreach($pho_list as $py=>$pvl){
		?><li>	
				<a href="<?=$public_r['newsurl']?>tribe/detail/?id=<?=$tribe_id?>&sid=<?=$pvl['id']?>&m=s">
					<img src="<?=$public_r['newsurl'].$pvl['url']?>" alt="<?=$pvl['title']?>" />
					<span style='width:110px;overflow:hidden;'><?=sub($pvl['title'],0,12)?></span>
				</a>
		</li>
		<?php 
			}	
		}else{?>
			<div class='no-data'>暂无照片！</div>
		<?php }?>
		</ul>
	  <span class="clear"></span>
	  <div class='page'>
		<?=$page_list?>
	  </div>
</div>
<!-- photo结束 -->